<?php 
	/*Hot Products*/
	$_helper = $this->helper('catalog/output');
	$hotProducts = $this->getHotProducts();
	$newProducts = $this->getNewProducts();
	$guessProducts = $this->getGuessProducts();
	$zgbHelper = Mage::helper('zgb');
?>

<div  class="row main">
	<div class="row section-1">
		<div class="section-left">
			<div class="sale-nav">
				<a class="active" data-salediv="sale-hot" href="<?php echo $this->getUrl('catalog/category/view/id/12/');?>?cat=14">本期爆款</a>
				<a data-salediv="sale-new" href="<?php echo $this->getUrl('catalog/category/view/id/12/');?>?cat=135">新品推荐</a>
				<!-- This is Need Rerite if($guessProducts = true) -->
				<?php if($guessProducts): ?>
					<a data-salediv="sale-guess" href="#">猜你喜欢</a>
				<?php endif ?>
			</div>
			<!-- Product Show This -->
			<div id="saleDiv" class="sale-div">
				<!-- Up leivo Douwn Leivo -->
				<ol class="sale-toolbar" data-flgdiv="sale-hot">
					<li><a class="sale-left"></a></li>
					<li><a class="sale-right"></a></li>
				</ol>
				<ul class="sale-hot active"   data-index="0">
					<?php $i=0; foreach($hotProducts as $_product): ?>
					<li>
						<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
							<div class="product-wrap">
								<div class="product-image">
									<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(180); ?>" width="180" height="180" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
									<?php if($zgbHelper->hasTag($_product)): ?>
									<div class="product-sale-tag">
										<img src="<?php echo $zgbHelper->getSaleTagUrl($_product, $this->getSkinUrl('images')); ?>" alt="">
									</div>
									<?php endif; ?>
								</div>
								<div class="product-shop">
									<h3><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h3>
									<div class="row home-page-slase-price-style">
										 <?php if(number_format($_product->getPrice(),2) <= number_format($_product->getFinalPrice(),2)): ?>
											<span class="col-2 special-price home-page-price-paddingleft">
							                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
							                </span>
							            <?php else : ?>
							                <span class="col-2 old-price" >
                                                ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
							                </span>
							                <span class="col-2 special-price">
							                    ￥&nbsp;<?php echo number_format($_product->getFinalPrice(),2); ?>
							                </span>
							            <?php endif; ?>
									</div>
								</div>
							</div>
						</a>
					</li>
					<?php endforeach; ?>
				</ul>

				<!-- New Products -->
				<ul class="sale-new" data-index="0">
					<?php $i=0; foreach($newProducts as $_product): ?>
					<li>
						<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
							<div class="product-wrap">
								<div class="product-image">
									<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(180); ?>" width="180" height="180" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
									<?php if($zgbHelper->hasTag($_product)): ?>
									<div class="product-sale-tag">
										<img src="<?php echo $zgbHelper->getSaleTagUrl($_product, $this->getSkinUrl('images')); ?>" alt="">
									</div>
									<?php endif; ?>
								</div>
								<div class="product-shop">
									<h3><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h3>
									<div class="row home-page-slase-price-style">
										 <?php if(number_format($_product->getPrice(),2) <= number_format($_product->getPrice(),2)): ?>
											<span class="col-2 special-price home-page-price-paddingleft">
							                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
							                </span>
							            <?php else : ?>
							                <span class="col-2 old-price" >
                                                ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
							                </span>
							                <span class="col-2 special-price">
							                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
							                </span>
							            <?php endif; ?>
									</div>
								</div>
							</div>
						</a>
					</li>
					<?php endforeach; ?>
				</ul>

				<!-- Guess Products -->
				<ul class="sale-guess"  data-index="0">
					<?php if(is_array($guessProducts)): ?>
						<?php $i=0; foreach($guessProducts as $_product): ?>
						<li>
							<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
								<div class="product-wrap">
									<div class="product-image">
										<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(180); ?>" width="180" height="180" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
										<?php if($zgbHelper->hasTag($_product)): ?>
										<div class="product-sale-tag">
											<img src="<?php echo $zgbHelper->getSaleTagUrl($_product, $this->getSkinUrl('images')); ?>" alt="">
										</div>
										<?php endif; ?>
									</div>
									<div class="product-shop">
										<h3><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h3>
										<div class="row home-page-slase-price-style">
											 <?php if(number_format($_product->getPrice(),2) <= number_format($_product->getPrice(),2)): ?>
												<span class="col-2 special-price home-page-price-paddingleft">
								                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
								                </span>
								            <?php else : ?>
								                <span class="col-2 old-price" >
	                                                ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
								                </span>
								                <span class="col-2 special-price">
								                    ￥&nbsp;<?php echo number_format($_product->getPrice(),2); ?>
								                </span>
								            <?php endif; ?>
										</div>
									</div>
								</div>
							</a>
						</li>
						<?php endforeach; ?>
					<?php endif; ?>
				</ul>
			</div>
		</div>
		<div class="section-right">
			<div class="row">
				<span>系统公告</span>
			</div>
			<div class="sysad">
				<ul class="slides">
					<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-message')->toHtml() ?>
				</ul>
			</div>
			<div class="sysad" style="height: 410px;margin-top: 10px;border: 1px solid #ccc;border-bottom: none;background: none;">
				<ul class="slides" style="margin: 0 auto;padding: 0;">
					<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-page-images')->toHtml() ?>
				</ul>
				<ol flex-control-nav flex-control-paging></ol>
			</div>
		</div>
	</div>